import LineSegmentsGeometry from "./LineSegmentsGeometry"

export default class LineGeometry extends LineSegmentsGeometry {
  isLineGeometry: boolean
  constructor() {
    super()
    this.type = "LineGeometry"
    this.isLineGeometry = !0
  }
  setPositions(e: number[]) {
    const t = e.length - 3
    const i = new Float32Array(2 * t)
    for (let n = 0; n < t; n += 3)
      (i[2 * n] = e[n]), (i[2 * n + 1] = e[n + 1]), (i[2 * n + 2] = e[n + 2]), (i[2 * n + 3] = e[n + 3]), (i[2 * n + 4] = e[n + 4]), (i[2 * n + 5] = e[n + 5])
    super.setPositions.call(this, i)
    return this
  }
  setColors(e) {
    const t = e.length - 3
    const i = new Float32Array(2 * t)
    for (let n = 0; n < t; n += 3)
      (i[2 * n] = e[n]), (i[2 * n + 1] = e[n + 1]), (i[2 * n + 2] = e[n + 2]), (i[2 * n + 3] = e[n + 3]), (i[2 * n + 4] = e[n + 4]), (i[2 * n + 5] = e[n + 5])
    return super.setColors.call(this, i), this
  }
  fromLine(e) {
    throw new Error("LineGeometry.fromLine not converted to TS yet")
  }
  copy(e) {
    return this
  }
}
